package com.capacitydorm.server.dao;

import com.capacitydorm.server.domain.Visitlog;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;

@org.apache.ibatis.annotations.Mapper
public interface VisitLogMapper extends Mapper<Visitlog> {

    @Select("SELECT id,user_id,`key`,`date`,state  FROM c_visitlog")
    List<Visitlog> selectAll();

    @Results({
            @Result(column = "user_id", property = "userId"),
            @Result(column = "key", property = "key"),
            @Result(column = "date", property = "date"),
            @Result(column = "state", property = "state")
    })
    @Select("select * from c_visitlog")
    List<Visitlog> selectAllLog();
}
